﻿using ce.autofac.extension;
using Microsoft.AspNetCore.Http;

namespace learun.util
{
    /// <summary>
    /// 版 本 Learun-ADMS-Core 力软敏捷开发框架
    /// Copyright (c) 2019-present 力软信息技术（苏州）有限公司
    /// 创建人：tobin
    /// 日 期：2019.09.02
    /// 描 述：web帮助类
    /// </summary>
    public static class WebHelper
    {
        /// <summary>
        /// 获取访问的客户客户端IP
        /// </summary>
        public static string GetClinetIP()
        {
            var accessor = IocManager.Instance.GetService<IHttpContextAccessor>();
            return accessor.HttpContext.Connection.RemoteIpAddress.ToString();
        }
    }
}
